import request from '@/utils/request'

// 查询故障类型
export function getProblemType (data) {
  return request({
    url: '/problem/find',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 新增故障类型
export function addProblemType (data) {
  return request({
    url: '/problem/save',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 删除故障类型
export function deleteProblemType (data) {
  return request({
    url: '/problem/delete',
    method: 'post',
    params: data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

